﻿

Public Class cSmartScript
    Private _Row As SortedList(Of String, sMysqlItem)

    Public Sub New(conn As MySQL, entryorguid As UInt32, id As UInt32)
        If IsNothing(conn) Then Throw New ArgumentNullException("cSmartScript: conn is nothing")
        Dim sql As String = "SELECT * FROM smart_scripts WHERE entryorguid=" & entryorguid & " AND id=" & id & ";"
        _Row = conn.ReadRow(sql)
    End Sub

    Public Property action_type As UInt32
        Get
            If _Row.ContainsKey("action_type") Then
                Return _Row.Item("action_type").Value
            Else
                Return 0
            End If
        End Get
        Set(value As UInt32)
            Stop
        End Set
    End Property

End Class
